package com.example.mobile2032021606163crw0615;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;


public class MyDataAdapter {
    private MySQLiteOpenHelper openHelper;
    private SQLiteDatabase database;

    public MyDataAdapter() {
    }

    public void openDB(Context context){
        openHelper = new MySQLiteOpenHelper(context, "student.db", null, 1);
        try {
            database = openHelper.getWritableDatabase();
        }catch (Exception e){
            database = openHelper.getReadableDatabase();
        }
    }
}
